export default function dateFormat(time: any) {
	const curYear = new Date().getFullYear() % 100
	const date = new Date(time)
	const transTime = (t: any) => {
		return t < 10 ? `0${t}` : t
	}
	const year = date.getFullYear() % 100
	const month = date.getMonth() + 1
	const day = date.getDate()
	const hours = date.getHours()
	const minutes = transTime(date.getMinutes())
	const seconds = transTime(date.getSeconds())
	return curYear === year
		? `${month}-${day} ${hours}:${minutes}:${seconds} `
		: `${year}-${month}-${day} ${hours}:${minutes}:${seconds} `
}
